using System;

namespace ScenarioFramework.Modules.FormHelper
{
	//*********************************************************************
	//
	// XMLActivityAction Class
	//
	// The XMLActivityAction class represents a collection base of XMLFlag
	// Its imports methods from bOSdotNET.XML.Data.XMLObjectSet like get set and add
	// XMLActivityAction Has no fields
	//
	//*********************************************************************

	public class XMLActivityAction : bOSdotNET.XML.Data.XMLObjectSet
	{
		public const string MAIN_NODE	= "ActivityAction";

		/** FIELDS **/

		public XMLFlags vFlags;
		public XMLReturnValue vReturnValue;

		/** CONSTRUCTORS **/

		/** CONSTRUCTOR Empty **/
		public XMLActivityAction()
		{
			this.Init();
		}

		/** CONSTRUCTOR Width XML parsering**/
		public XMLActivityAction(System.Xml.XmlNode nodeList)
		{
			this.Parse (nodeList);
		}

		/** Properties **/

		/** no Properties **/


		/** INSTANCE METHODS **/

		override public void Init()
		{
			vFlags = new XMLFlags();
		}

		override public void Parse(System.Xml.XmlNode nodeList)
		{
			this.Init();

			System.Xml.XmlNode node;

			/** find subcollection fileds to add **/
			for ( int i=0; i<nodeList.ChildNodes.Count;i++)
			{
				node = nodeList.ChildNodes[i];

				switch ( node.Name) 
				{
					case XMLFlags.MAIN_NODE:
						vFlags.Parse(node);
						break;
				}
			}

		}

		override public bOSdotNET.XML.XMLNode GetXMLNode()
		{
			bOSdotNET.XML.XMLNode XMLNode = new bOSdotNET.XML.XMLNode(XMLProcessAction.MAIN_NODE);
			
			XMLNode.AddNode (vFlags.GetXMLNode());

			return XMLNode;
		}
		
	}
}
